home *** CD-ROM | disk | FTP | other *** search
/ Joystick Magazine 2002 October / JOY141_CD2.iso / Data / Sharewares / Graphisme / Nimo50Build8.exe / Div Fix / Source / DivFix.dpr < prev    next >
Text File  |  2002-01-28  |  2KB  |  74 lines

  1. {DivFix is a utility for reindexing partial DivX AVI movies
  2. Copyright (C) 2000-2002  Csaba Budai
  3.  
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8.  
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. GNU General Public License for more details.
  13.  
  14. You should have received a copy of the GNU General Public License
  15. along with this program; if not, write to the Free Software
  16. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA}
  17.  
  18. program DivFix;
  19.  
  20. uses
  21.   Forms, SysUtils,
  22.   DivX in 'DivX.pas' {Form1},
  23.   About in 'About.pas' {Form2};
  24.  
  25.   Var SearchRec    :    TSearchRec;
  26. {$R *.RES}
  27.  
  28. begin
  29.   Application.Initialize;
  30.   Application.CreateForm(TForm1, Form1);
  31.   Application.CreateForm(TForm2, Form2);
  32.   If ParamCount>0 Then
  33.   Begin
  34.       If ParamCount>1 Then
  35.     Begin
  36.         If (ParamStr(1)='-r') Or (ParamStr(1)='-R') Then
  37.       Begin
  38.           If FindFirst(ParamStr(2),faAnyFile,SearchRec)=0 Then
  39.         Repeat
  40.               With TForm1.Create(nil) Do
  41.                 Try
  42.             MaskEdit1.Text:=ExtractFilePath(ParamStr(2))+SearchRec.Name;
  43.                 Show;
  44.                 Refresh;
  45.             Button2Click(nil);
  46.               Finally
  47.               Free;
  48.             End;
  49.         Until FindNext(SearchRec)<>0;
  50.         FindClose(SearchRec);
  51.       End;
  52.     End
  53.     Else
  54.     Begin
  55.          If FindFirst(ParamStr(1),faAnyFile,SearchRec)=0 Then
  56.       Begin
  57.              Repeat
  58.                  With TForm1.Create(nil) Do
  59.                    Try
  60.                  MaskEdit1.Text:=ExtractFilePath(ParamStr(1))+SearchRec.Name;
  61.                         Show;
  62.                    Refresh;
  63.                  Button1Click(nil);
  64.                     Finally
  65.                     Free;
  66.               End;
  67.              Until FindNext(SearchRec)<>0;
  68.           FindClose(SearchRec);
  69.       End;
  70.     End;
  71.   End
  72.   Else Application.Run;
  73. end.
  74.